import { request } from "umi";

//分类管理接口
export function getCategoryList() {
  return request('/prod/category/table', {
    method: "GET"
  })
}
// 热搜管理接口
export function getShopSearch(payload:any) {
  let params = {
    t: 1652338093955,
    current:payload.current,
    size: 20,
    title:payload.title,
    content:payload.content,
    status:payload.status
  }
  return request('/admin/hotSearch/page', {
    method: "GET",
    params
  })
}
// 热搜管理删除
export function deleteShopSearch(payload: any){
   return request('/admin/hotSearch',{
     method:"DELETE",
     data:payload
   })
}
// 热搜管理增加
export function increaseShopSearch(payload: any){
  return request('/admin/hotSearch',{
    method:"POST",
    data:payload
  })
}
// 热搜管理修改
export function modifyShopSearch(payload: any){
  return request('/admin/hotSearch',{
    method:"PUT",
    data:payload
  })
}
// 参数管理数据
export function getsysConfig(payload:any) {
  let params = {
    t: 1652338093955,
    current:payload.current,
    size: 10,
    paramKey:payload.paramKey
  }
  return request('/sys/config/page', {
    method: "GET",
    params
  })
}

// 参数管理删除
export function deletesysConfig(payload: any){
  return request('/sys/config',{
    method:"DELETE",
    data:payload
  })
}
// 参数管理增加
export function increaseConfig(payload: any){
  return request('/sys/config',{
    method:"POST",
    data:payload
  })
}
// 热搜管理修改
export function modifyConfig(payload: any){
  return request('/sys/config',{
    method:"PUT",
    data:payload
  })
}
